<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动</title>
    <style>
        body{
            margin: 0px;
        }
        /*设置一行显示两列*/
        #side{
            width: 300px;
            height: 300px;
            background-color: aqua;
            float: left;
        }
        #main{
            height: 320px;
            background-color: red;
            margin: 0 300px;
        }
        #side1{
            width:300px ;
            height: 300px;
            background-color: antiquewhite;
            float: right;
        }
        #center{
            width: 900px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
    <div id="center">
        <div id="side">
            这里显示的是side
        </div>
        <div id="side1">
            这里显示的是side1
        </div>
        <div id="main">
            这里显示的是main
        </div>
    </div>
</body>
</html>